package demo.admin.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class GlobalConfig {

    // JWT的secret_key
    public static String SECRET_KEY;

    @Value("${config.token.secret_key}")
    public void setSecretKey(String secretKey) {
        SECRET_KEY = secretKey;
    }

    // JWT的有效时间(单位分钟)
    public static Integer EXPIRE_TIME;

    @Value("${config.token.expire_time}")
    public void setExpireTime(Integer expireTime) {
        EXPIRE_TIME = expireTime;
    }
}
